﻿@{
    ViewBag.Title = "ReplacePatternWithString";
    Layout = "~/Views/Shared/_Page.cshtml";
}

<h2>Replace Pattern With String</h2>

<script type="text/javascript">
    window.onload = function () {
        var searchString = "Now is the time, this is the tame";
        var re = /t\w{2}e/g;
        var replacement = searchString.replace(re, "place");
        ZEUS.DEBUG.log(replacement); // Now is the place, this is the place
    }
</script>
